function getStyle(obj,attr){

    if(window.getComputedStyle){

        return getComputedStyle(obj)[attr];

    }else{

        return obj.currentStyle[attr];

    }
}